package com.example.other;

import org.junit.Test;

/**
 * @author readpage
 * @create 2022-09-12 15:47
 *
 * 其他常用类的使用
 * 1.System
 * 2.Math
 * 3.BigInteger 和 BigDecimal
 */
public class OtherClassTest {

    @Test
    public void test() {
        String javaVersion = System.getProperty("java.version");
        System.out.println("java的version:" +javaVersion);

        String javaHome = System.getProperty("java.home");
        System.out.println("java的home:" +javaHome);

        String osName = System.getProperty("os.name");
        System.out.println("os的name:" +osName);

        String osVersion = System.getProperty("os.version");
        System.out.println("os的version:" +osVersion);

        String userName = System.getProperty("user.name");
        System.out.println("user的name:" +userName);

        String userHome = System.getProperty("user.home");
        System.out.println("user的home:" +userHome);

        String userDir = System.getProperty("user.dir");
        System.out.println("user的dir:" +userDir);
    }
}
